package com.g2room.driving.generate.to;

import java.util.ArrayList;
import java.util.List;

import com.g2room.driving.model.po.Article;

public class ArticleTo extends Article {
	private static final long serialVersionUID = -5210916111939955641L;
	// 主图
	private String mainImg;
	// 主图宽
	private int imgWidth;
	
	// 缩略图
	private String thumb;
	private String tag;
	private List<String> tags;
	

	public List<String> getTags() {
		return tags;
	}

//	public void setTags(List<String> tags) {
//		this.tags = tags;
//	}

	public String getThumb() {
		return thumb;
	}

	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
		if(null != tag && tag.trim().length() > 0) {
			this.tags = new ArrayList<String>();
			String[] tags = tag.split(",");
			for(String t : tags) {
				this.tags.add(t);
			}
		}
	}

	public String getMainImg() {
		return mainImg;
	}

	public void setMainImg(String mainImg) {
		this.mainImg = mainImg;
	}

	public int getImgWidth() {
		return imgWidth;
	}

	public void setImgWidth(int imgWidth) {
		this.imgWidth = imgWidth;
	}
	
}
